package com.cjl.open.okhttp;

import com.cjl.open.okhttp.interceptor.*;

import java.util.ArrayList;
import java.util.List;

public class InterceptorsDemo {
    public static void main(String[] args) {

        List<Interceptor> interceptors = new ArrayList<>();
        interceptors.add(new RetryAndFollowUpInterceptor());
        interceptors.add(new BridgeInterceptor());
        interceptors.add(new CacheInterceptor());
        interceptors.add(new ConnectInterceptor());
        interceptors.add(new CallServerInterceptor());

        //链条对象
        Chain chain = new Chain(interceptors, 0);
        System.out.println(chain.processd("Http请求"));

    }
}
